package com.example.shapetext;

public class Oblong extends Shape1 {
    double length;
    double wide;

    public Oblong(double length, double wide) {
        this.length = length;
        this.wide = wide;
    }

    @Override
    public void getParameter() {
        double c=2*length+2*wide;
        System.out.println("长方形周长是:"+c);
    }

    @Override
    public void getArea() {
        double s=length*wide;
        System.out.println("长方形面积是:"+s);
    }
}
